﻿import './my.css'

const version = '1.25.112502'

import Server from './Server.js'
import Message from './Message.js'
import myEncode from './my-encode.js'
import store from './store.js'
import mydate from './mydate.js'
import zoomImage from './zoomImage.js'


import MyCell from './MyCell.vue'
import MyDialog from './MyDialog.vue'
import ImageUploader from './ImageUploader.vue'
import FileUploader from './FileUploader.vue'
import MySelect from './MySelect.vue'
import TextContent from './TextContent.vue'
import ContentEdit from './ContentEdit.vue'
import MyContent3 from './MyContent3.vue'
import MyPageHeader from './MyPageHeader.vue'
import MyMapDlg from './MyMapDlg.vue'
import MyAddressInput from './MyAddressInput.vue'
import MyBoxGrid from './MyBoxGrid.vue'
import Utils from './Utils.js'

import MyFormItem from './MyFormItem.js'
import MyFormRow from './MyFormRow.js'
import MyFormDlg from './MyFormDlg.vue'
import MyFormPage from './MyFormPage.vue'
import MySimpleFormDlg from './MySimpleFormDlg.vue'
import MyGrid from './MyGrid.vue'
import MyChildGrid from './MyChildGrid.vue'


import MySearchBar from './MySearchBar.vue'
import MySelectInput from './MySelectInput.vue'
import MySelectWin from './MySelectWin.vue'
import MySelectWinH5 from './MySelectWinH5.vue'
import MySearchDlg from './MySearchDlg.vue'


import MyListPage from './MyListPage.vue'
import MyMListPage from './MyMListPage.vue'
import MyBoxGridPage from './MyBoxGridPage.vue'
import MyBoxGridPage2 from './MyBoxGridPage2.vue'

import MyDlgManager from './MyDlgManager.vue'


import RightsTag from './other/RightsTag.vue'
import FuncRights from './other/FuncRights.vue'
import Pszq from './other/Pszq.vue'
import CusStyleTextCol from './other/CusStyleTextCol.vue'
import MenuBox from './other/MenuBox.vue'
import HandWriteBoard from './other/HandWriteBoard.vue'
import HandWriteDialog from './other/HandWriteDialog.vue'

import GroupCheckList from './other/GroupCheckList.vue'
import MyRadioGroup from './MyRadioGroup.vue'
import MyIntNumber from './MyIntNumber.vue'
import MyTags from './MyTags.vue'
import MyDateTime3 from './MyDateTime3.vue'

import MyListBox from './MyListBox.vue'
import MyFloatButton from './MyFloatButton.vue'

import MyCheckGroup from './MyCheckGroup.vue'
import MyOtherCombo from './MyOtherCombo.vue'

import MyImg from './MyImg.js'
//import MySelectArea from './other/MySelectArea.js'
import MyTime2 from './other/MyTime2.vue'
import TextOrImgEdit from './other/TextOrImgEdit.vue'
import TextOrImgEditDlg from './other/TextOrImgEditDlg.vue'
import TextAndImgEdit from './other/TextAndImgEdit.vue'
import TextAndImgEditDlg from './other/TextAndImgEditDlg.vue'

// import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import MyListDlg from './MyListDlg.vue'
import IphoneDate from './other/IphoneDate.vue'
import draggable from './other/vuedraggable/vuedraggable.js';
import SubListForm from './SubListForm.vue';
import MultiSign from './other/MultiSign.vue';
import MyLink from './MyLink'

import MedialFile from './other/MedialFile.vue'
import ItemEdit from './other/ItemEdit.vue'
import MyVideoRecord from './other/MyVideoRecord.vue'
import MyCheckBox3 from './MyCheckBox3.vue'
import MySelectDates from './other/MySelectDates.vue'
import MySelectItemsDialog from './other/MySelectItemsDialog.vue'
import MyChart from './MyChart.vue'
import MyGridBox from './MyGridBox.vue'

import SelectEditText from './sztbhz/SelectEditText.js'
import MySelectTreeDlg from './MySelectTreeDlg.js'
import MyRepeatRows from './MyRepeatRows.vue'
import Bool2Icon from './other/Bool2Icon.vue'
import MyMarkdown from './other/MyMarkdown.vue'
import MyTextEllipsis from './MyTextEllipsis.vue'
import AudioText from './other/AudioText.vue'
import QrCodeView from './other/QrCodeView.vue'
import SplitContainer from './other/SplitContainer.vue'
import QrCodeDlg from './sztbhz/QrCodeDlg.vue'
import ViewImgDlg from './sztbhz/ViewImgDlg.vue'
import MyPhotoGallery from './MyPhotoGallery.vue'
import MyTreeSelectInput from './MyTreeSelectInput.vue'

// import * as VusUseComponents from '@vueuse/components'

function install(app) {
    // for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    //     if(!app.component(key)){
    //         app.component(key, component);
    //     }
    // }
    // for (const [key, component] of Object.entries(VusUseComponents)) {
    //     if(key.startsWith("v")){
    //         console.log(key, component);
    //         app.directive(key, component);
    //     }
    // }

    app.component("MyIntNumber", MyIntNumber);
    app.component("MyRadioGroup", MyRadioGroup);
    app.component("MyTags", MyTags);
    app.component("MyDateTime3", MyDateTime3);

    app.component("MyImg", MyImg);
    app.component(MyCell.name, MyCell);
    app.component(MyPageHeader.name, MyPageHeader);
    app.component(MyDialog.name, MyDialog);
    app.component(ImageUploader.name, ImageUploader);
    app.component(FileUploader.name, FileUploader);
    app.component(MySelect.name, MySelect);
    app.component(TextContent.name, TextContent);
    app.component(ContentEdit.name, ContentEdit);
    app.component(MyContent3.name, MyContent3);
    app.component(MyMapDlg.name, MyMapDlg);
    app.component(MyAddressInput.name, MyAddressInput);
    app.component(MyBoxGrid.name, MyBoxGrid);

    app.component(MyFormItem.name, MyFormItem);
    app.component(MyFormRow.name, MyFormRow);
    app.component(MyFormDlg.name, MyFormDlg);
    app.component(MySimpleFormDlg.name, MySimpleFormDlg);
    app.component(MyFormPage.name, MyFormPage);
    app.component(MyGrid.name, MyGrid);
    app.component(MyChildGrid.name, MyChildGrid);

    app.component(MySearchBar.name, MySearchBar);
    app.component(MySelectInput.name, MySelectInput);
    app.component(MySelectWin.name, MySelectWin);
    app.component(MySelectWinH5.name, MySelectWinH5);
    app.component(MySearchDlg.name, MySearchDlg);

    app.component(MyListPage.name, MyListPage);
    app.component(MyMListPage.name, MyMListPage);
    app.component(MyBoxGridPage.name, MyBoxGridPage);
    app.component(MyDlgManager.name, MyDlgManager);

    app.component(RightsTag.name, RightsTag);
    app.component(FuncRights.name, FuncRights);
    app.component(Pszq.name, Pszq);
    app.component(CusStyleTextCol.name, CusStyleTextCol);
    app.component(MenuBox.name, MenuBox);
    app.component(HandWriteBoard.name, HandWriteBoard);
    app.component(HandWriteDialog.name, HandWriteDialog);
    app.component(GroupCheckList.name, GroupCheckList);
    app.component("MyListBox", MyListBox);
    app.component(MyFloatButton.name, MyFloatButton);
    app.component("MyCheckGroup", MyCheckGroup);
    app.component(MyOtherCombo.name, MyOtherCombo);
    //app.component("MySelectArea", MySelectArea);
    
    app.component("MyListDlg",MyListDlg);
    app.component("MyTime2",MyTime2);
    app.component("time2",MyTime2);
    app.component("TextImageEditor",TextOrImgEdit);
    app.component("TextImageEditorDlg",TextOrImgEditDlg);

    app.component("TextOrImgEdit",TextOrImgEdit);
    app.component("TextOrImgEditDlg",TextOrImgEditDlg);
    app.component("TextAndImgEdit",TextAndImgEdit);
    app.component("TextAndImgEditDlg",TextAndImgEditDlg);

    app.component("IphoneDate",IphoneDate);
    app.component("draggable",draggable);
    app.component("SubListForm",SubListForm);
    app.component("MultiSign",MultiSign);
    app.component("MyLink", MyLink);
    app.component("MedialFile",MedialFile);
    app.component("MediaFile",MedialFile);
    app.component("ItemEdit",ItemEdit);
    app.component("MyVideoRecord",MyVideoRecord);
    app.component("MyCheckBox3", MyCheckBox3);
    app.component("MySelectDates", MySelectDates);
    app.component("MySelectItemsDialog", MySelectItemsDialog);
    app.component("MyChart", MyChart);
    app.component("MyGridBox",MyGridBox);
    app.component("SelectEditText",SelectEditText);
    app.component("MySelectTreeDlg", MySelectTreeDlg);
    app.component("MyRepeatRows",MyRepeatRows);
    app.component("Bool2Icon", Bool2Icon);
    app.component("MyMarkdown",MyMarkdown);
    app.component("MyTextEllipsis",MyTextEllipsis);
    app.component("AudioText",AudioText);
    app.component("QrCodeView",QrCodeView)
    app.component("SplitContainer",SplitContainer)
    app.component("QrCodeDlg",QrCodeDlg)
    app.component("ViewImgDlg",ViewImgDlg)
    app.component("MyPhotoGallery",MyPhotoGallery)
    app.component("MyTreeSelectInput",MyTreeSelectInput)

    app.config.globalProperties.$store = store
    app.config.globalProperties.$server = Server
    app.config.globalProperties.$msg = Message;
    app.config.globalProperties.$mbh5 = store.$mbh5;//手机浏览器
    window.$msg = Message;
    window.$server = Server;
    window.$server.__app = app;
    window.$store = store;
    window.$mbh5 = store.$mbh5;
    window.mydate = mydate;

    window.$server.version = version;
}




export {
    Server, Message, myEncode, store, mydate, zoomImage,
    MyCell, MyDialog, ImageUploader, FileUploader, MySelect, TextContent, ContentEdit, MyContent3,
    MyPageHeader, MyMapDlg, MyAddressInput, MyBoxGrid, Utils,
    MyFormItem, MyFormRow, MyFormDlg, MyFormPage, MyGrid, MyChildGrid,
    MySearchBar, MySelectInput, MySelectWin, MySelectWinH5, MySearchDlg,
    MyListPage, MyMListPage, MyBoxGridPage, MyBoxGridPage2, MyDlgManager,
    RightsTag, FuncRights, Pszq, CusStyleTextCol, MenuBox, HandWriteBoard, HandWriteDialog, GroupCheckList, MyRadioGroup, MyIntNumber,
    MyListBox, MyFloatButton, MyCheckGroup, MyOtherCombo, //MySelectArea,
    MyListDlg, MyTime2,TextOrImgEdit,TextOrImgEditDlg,TextAndImgEdit,TextAndImgEditDlg,IphoneDate,draggable,SubListForm,MultiSign,
    MyLink,MedialFile, ItemEdit, MyVideoRecord,MyCheckBox3,MySelectDates,MySelectItemsDialog, MyChart,MyRepeatRows, Bool2Icon,
    MyMarkdown,MyTextEllipsis,AudioText,QrCodeView,SplitContainer,ViewImgDlg,QrCodeDlg,MyPhotoGallery,MyTreeSelectInput,
    install, version, 
}
